//
//  ListEventViewCell.m
//  eticket
//
//  Created by AnhQuocNguyen on 4/11/13.
//  Copyright (c) 2013 SoinMedia. All rights reserved.
//

#import "ListEventViewCell.h"

@implementation ListEventViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)dealloc {
    [_imgViewAvatar release];
    [_lbDate release];
    [_txtDescription release];
    [_containerAvatar release];
    [_btnGetTicket release];
    [super dealloc];
}


- (void)setupForCell{
    _imgViewAvatar.clipsToBounds = YES;
    _imgViewAvatar.contentMode = UIViewContentModeScaleToFill;
    
    
    _containerAvatar.layer.borderColor = [[UIColor colorWithRed:237/255 green:237/255 blue:237/255 alpha:.2] CGColor];
    _containerAvatar.layer.borderWidth = 0.7;
    _containerAvatar.layer.shadowColor = [[UIColor whiteColor] CGColor];
    _containerAvatar.layer.shadowRadius = 50;
    _containerAvatar.layer.masksToBounds = YES;
    
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapDetected:)];
    tapGesture.numberOfTapsRequired = 1;
    [_btnGetTicket addGestureRecognizer:tapGesture];
    SAFE_RELEASE_OBJECT(tapGesture);
    
}

- (void)tapDetected:(UITapGestureRecognizer *)gesture{
    if ([_listEventViewCellDelegate respondsToSelector:@selector(listEventViewCellDidSelectedEvent:)]) {
        [_listEventViewCellDelegate listEventViewCellDidSelectedEvent:self];
    }    
}




@end
